<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="cn.edu.ujn.shi.dao.Complain" %>
<%@ page import="cn.edu.ujn.shi.dao.UserType" %>
<%@ include file="header-admin.jsp" %>
<center>
    <hr/>
    <img src='images/top.jpg' width='100%' height='120px'/>
    <hr/>
</center>
<br/>
<center><img src='images/u6.png' height=70px><font size='+4' face='楷体' color='#7D26CD'><b>用户身份信息</b></font>
</center>
<a href='addUserType'><img src='images/add.png' width='100px'/></a>
<hr/>
<center>
    <form action="userTypeList" method="get">
        <label for="type">按类型名搜索：</label>
        <input type="text" id="type" name="type">
        <button type="submit">搜索</button>
    </form>
    <table border=1 width=90%>
        <tr bgcolor='#E0EEE0'>
            <td>id</td>
            <td>类型</td>
            <td>创建人</td>
            <td>创建时间</td>
            <td>操作</td>
        </tr>
        <%
            List<UserType> list = (List<UserType>) request.getAttribute("list");
            for (UserType g : list) {
                out.println("<tr>");
                out.print("<td>" + g.getId() + "</td>" +
                        "<td>" + g.getType() + "</td>" +
                        "<td>" + g.getCreateUser() + "</td>" +
                        "<td>" + g.getCreateTime() + "</td>");
                out.println("<td><a href='updateUserType?id=" + g.getId() + "'>修改</a>");
                out.println("<a href='DeleteUserTypeServlet?id=" + g.getId() + "'>删除</a>");
                out.println("</td>");
                out.println("</tr>");
            }
        %>
    </table>
</center>
<%@ include file="footer.jsp" %>

